//  Created by SongLian on 16/7/10.
//  Copyright © 2016年 SongLian. All rights reserved.


#import <UIKit/UIKit.h>

// 日志输出
#define SLDebug
#ifdef  SLDebug
#define SLLog(...) NSLog(__VA_ARGS__)
#else
#define SLLog(...)
#endif

//  Size
#define SLSize_Screen [UIScreen mainScreen].bounds.size

//  Ponit
#define SLPoint_ScreenCenter CGPointMake(kSLScreenWidth/2.0, kSLScreenHeight/2.0)

//  Height
#define SLHeight_ScreenSubTabBar (SLHeight_Screen - SLHeight_TabBar)
#define SLHeight_ScreenSubNavigationBar (SLHeight_Screen - SLHeight_NavigationBar)
#define SLHeight_ScreenSubTabNavigationBar (SLHeight_Screen - SLHeight_TabBar - SLHeight_NavigationBar)
#define SLHeight_Screen [UIScreen mainScreen].bounds.size.height
#define SLHeight_HalfScreen ([UIScreen mainScreen].bounds.size.height * SLFloat_Half)

//  Width
#define SLWidth_Screen [UIScreen mainScreen].bounds.size.Width
#define SLWidth_HalfScreen ([UIScreen mainScreen].bounds.size.Width * SLFloat_Half)

//  Rect
#define SLRect_Screen [UIScreen mainScreen].bounds

//  Color
#define SLColor_RGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
#define SLColor_RGB(r, g, b) SLColor_RGBA(r, g, b, SLFloat_Whole)
#define SLColor_Black [UIColor blackColor]
#define SLColor_White [UIColor whiteColor]
#define SLColor_Clear [UIColor clearColor]

//  WeakSelf
#define SLWeakSelf_Name(weakSelf) __weak typeof(self) weakSelf = self

#define SLArray @[]
#define SLString @""
#define SLDictionary @{}
#define SLMutableArray [SLArray mutableCopy]
#define SLMutableString [SLString mutableCopy]
#define SLMutableDictionary [SLDictionary mutableCopy]

//  String
UIKIT_EXTERN NSString * const SLString_Empty;
UIKIT_EXTERN NSString * const SLString_Space;
UIKIT_EXTERN NSString * const SLString_Zero;
UIKIT_EXTERN NSString * const SLString_Comma;
UIKIT_EXTERN NSString * const SLString_Point;

//  Float
UIKIT_EXTERN const CGFloat SLFloat_Zero;
UIKIT_EXTERN const CGFloat SLFloat_Half;
UIKIT_EXTERN const CGFloat SLFloat_Whole;
UIKIT_EXTERN const CGFloat SLHeight_NavigationBar;
UIKIT_EXTERN const CGFloat SLHeight_TabBar;

UIKIT_EXTERN NSString * const SLObject_Placeholder;


typedef void (^SLBlock)();
typedef void (^SLParameterBlock)(id object);
typedef id (^SLReturnParameterBlock)(id object);

